//
//  String+Code.swift
//  Weibo
//
//  Created by ZhuDong on 16/6/2.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit
extension String{
    func getEmojiWithHexString()->String{
        let scanner = NSScanner(string: self)
        var hexInt: UInt32 = 0
        scanner.scanHexInt(&hexInt)
        let emojiCode = Character(UnicodeScalar(hexInt))
        return "\(emojiCode)"
    }
}